package com.sky.controller.user;

import com.sky.result.Result;
import com.sky.service.UserService.UserService;
import com.sky.vo.CategorySelectIdVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController("userCategoryController")
@RequestMapping("/user/category")
@Api(tags = "小程序查询分类")
public class UserCategoryController {
    @Resource
    private UserService userServicel;


    @GetMapping("list")
    @ApiOperation("查询分类")
    public Result selectByMenu (){
        List<CategorySelectIdVO> byType = userServicel.getByType();
        return Result.success(byType);
    }
}
